package com.github.xtranslation.core.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Result: 统一结果包装体,简单模拟controller返回体
 *
 * @author zhangxiaoxiang
 * @since 2025/9/7
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {

    private String code;

    private String message;

    private T data;

    public static <T> Result<T> success(T data) {
        return Result.<T>builder().code("0").message("成功").data(data).build();
    }


}
